var comparator;switch(parseInt(this._dataGrid.sortColumnIdentifier(),10)){case 0:comparator=localeCompare.bind(null,"name");break;case 1:comparator=localeCompare.bind(null,"type");break;case 2:comparator=numberCompare.bind(null,"size");break;default:localeCompare.bind(null,"resource");}
var dataGrid=new WebInspector.DataGrid(columns,this._editingCallback.bind(this),this._deleteCallback.bind(this));dataGrid.setName("DOMStorageItemsView");length=nodes.length;for(var i=0;i<length;++i)
{this.database.executeSql("SELECT * FROM \""+this._escapeTableName(this.tableName)+"\"",this._queryFinished.bind(this),this._queryError.bind(this));},_queryFinished:function(columnNames,values)
{this.detachChildViews();this.element.removeChildren();var dataGrid=WebInspector.DataGrid.createSortableDataGrid(columnNames,values);if(!dataGrid){this._emptyView=new WebInspector.EmptyView(WebInspector.UIString("The ΓÇ£%sΓÇ¥\ntable is empty.",this.tableName));this._emptyView.show(this.element);return;}
{var editorToolbar=document.createElement("div");editorToolbar.classList.add("status-bar");editorToolbar.classList.add("data-view-toolbar");this._pageBackButton=editorToolbar.createChild("button","back-button");this._pageBackButton.classList.add("status-bar-item");this._pageBackButton.title=WebInspector.UIString("Show previous page.");this._pageBackButton.disabled=true;this._pageBackButton.appendChild(document.createElement("img"));this._pageBackButton.addEventListener("click",this._pageBackButtonClicked.bind(this),false);editorToolbar.appendChild(this._pageBackButton);this._pageForwardButton=editorToolbar.createChild("button","forward-button");this._pageForwardButton.classList.add("status-bar-item");this._pageForwardButton.title=WebInspector.UIString("Show next page.");this._pageForwardButton.disabled=true;this._pageForwardButton.appendChild(document.createElement("img"));this._pageForwardButton.addEventListener("click",this._pageForwardButtonClicked.bind(this),false);editorToolbar.appendChild(this._pageForwardButton);this._keyInputElement=editorToolbar.createChild("input","key-input");this._keyInputElement.placeholder=WebInspector.UIString("Start from key");this._keyInputElement.addEventListener("paste",this._keyInputChanged.bind(this));this._keyInputElement.addEventListener("cut",this._keyInputChanged.bind(this));this._keyInputElement.addEventListener("keypress",this._keyInputChanged.bind(this));this._keyInputElement.addEventListener("keydown",this._keyInputChanged.bind(this));return editorToolbar;},_pageBackButtonClicked:function()
var mainResource=WebInspector.resourceTreeModel.inspectedPageURL()&&this.resourcesListTreeElement&&this.resourcesListTreeElement.expanded?WebInspector.resourceTreeModel.resourceForURL(WebInspector.resourceTreeModel.inspectedPageURL()):null;if(mainResource)
{var frame=event.data;var parentFrame=frame.parentFrame;var parentTreeElement=parentFrame?this._treeElementForFrameId[parentFrame.id]:this.resourcesListTreeElement;if(!parentTreeElement){console.warn("No frame to route "+frame.url+" to.")
return;}
var frameTreeElement=new WebInspector.FrameTreeElement(this,frame);this._treeElementForFrameId[frame.id]=frameTreeElement;parentTreeElement.appendChild(frameTreeElement);},_frameDetached:function(event)
var frameTreeElement=new WebInspector.ApplicationCacheFrameTreeElement(this,frameId,manifestURL);manifestTreeElement.appendChild(frameTreeElement);manifestTreeElement.expand();this._applicationCacheFrameElements[frameId]=frameTreeElement;},_applicationCacheFrameManifestRemoved:function(event)
var selectionElement=document.createElement("div");selectionElement.className="selection";this.listItemElement.appendChild(selectionElement);if(!this._noIcon){this.imageElement=document.createElement("img");this.imageElement.className="icon";this.listItemElement.appendChild(this.imageElement);}
var resourceTreeElement=new WebInspector.FrameResourceTreeElement(this._storagePanel,resource);this._insertInPresentationOrder(categoryElement,resourceTreeElement);this._treeElementForResource[resource.url]=resourceTreeElement;},resourceByURL:function(url)
for(var indexName in this._idbIndexTreeElements){if(!indexNames[indexName])
this._indexRemoved(indexName);}
for(var indexName in this._idbIndexTreeElements){if(!indexNames[indexName]){this.removeChild(this._idbIndexTreeElements[indexName]);delete this._idbIndexTreeElements[indexName];}}